<font class="bigger_subject">Current investments</font>
<g:remoteLink controller="buy" action="register" update="register_buy">Register buy</g:remoteLink>
<br/>
<div id="register_buy"></div>
<hr />

<table width="750">
  <tr>
    <td>
      <font class="regular_subject">
        Sort by:
      </font>
      <g:remoteLink controller="investments" action="allcurrent" update="main" params="[sort:'stock', order:'desc']">
          Name
      </g:remoteLink>,
      <g:remoteLink controller="investments" action="allcurrent" update="main" params="[sort:'progress', order:'asc']">
          Progress
      </g:remoteLink>,
      <g:remoteLink controller="investments" action="allcurrent" update="main" params="[sort:'value', order:'asc']">
          Value
      </g:remoteLink>,
      <g:remoteLink controller="investments" action="allcurrent" update="main" params="[sort:'targetValue', order:'asc']">
          target
      </g:remoteLink>
    </td>
  </tr>
</table>
<br/>

<table width="750" class="listing_header">
  <tr>
    <td class="regular_subject" width="50">
      Quantity
    </td>
    <td class="regular_subject" width="50">
      Ac. stock price
    </td>
    <td class="regular_subject" width="50">
      Current stock price
    </td>
    <td class="regular_subject" width="50">
      Time
    </td>
    <td class="regular_subject" width="150">
      Current value
    </td>
    <td class="regular_subject" width="150">
      Current profit
    </td>
    <td class="regular_subject" width="150">
      Target value
    </td>
    <td class="regular_subject" width="100">
      
    </td>
  </tr>
</table>

  <table style='border-width: 0px 0px 0px 0px; border-style: dashed dashed dashed dashed; border-color: #000000;' width="750">
    <g:each in="${currentInvestments}">
      <tr>
        <td>
          <div id="buy_${it.id}">
            <g:include controller="investments" action="current" id="${it.id}" />
          </div>
          <br/>
        </td>
      </tr>
    </g:each>
  </table>


<font class="regular_subject">
  Summary
</font><br/>
<g:render template="/investments/current_summary" />